﻿<phone:PhoneApplicationPage 
    x:Class="MyMeetup.RadControlsItem1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:telerikSlideView="clr-namespace:Telerik.Windows.Controls.SlideView;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:telerikPagination="clr-namespace:Telerik.Windows.Controls.Pagination;assembly=Telerik.Windows.Controls.Primitives"
    d:DataContext="{d:DesignData SampleData/MainDataViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape"  Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False"
    DataContext="{Binding PhotoPageViewModel, Source={StaticResource Locator}}">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.Resources>

            <DataTemplate x:Key="RadPaginationControlItemTemplate">
                <Border BorderBrush="{StaticResource PhoneForegroundBrush}" Margin="3" BorderThickness="3">
                    <Rectangle Fill="Transparent" Width="18" Height="18"/>
                </Border>
            </DataTemplate>
            <DataTemplate x:Key="RadPaginationControlCurrentItemTemplate">
                <Rectangle Fill="{StaticResource PhoneForegroundBrush}" Margin="3" Width="24" Height="24"/>
            </DataTemplate>
            <Style TargetType="telerikPagination:PaginationIndexLabelControl" x:Key="RadPaginationControlIndexLabelStyle">
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="Margin" Value="10,0,0,0"/>
            </Style>
            <DataTemplate x:Key="RadSlideViewItemTemplate">
                <telerikSlideView:PanAndZoomImage Stretch="Uniform" Source="{Binding photo_link}">
                    <telerikSlideView:PanAndZoomImage.BusyIndicatorStyle>
                        <Style TargetType="telerikPrimitives:RadBusyIndicator">
                            <Setter Property="AnimationStyle" Value="AnimationStyle9"/>
                        </Style>
                    </telerikSlideView:PanAndZoomImage.BusyIndicatorStyle>
                </telerikSlideView:PanAndZoomImage>
            </DataTemplate>
            <DataTemplate x:Key="RadSlideViewOverlayContentTemplate">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Rectangle Fill="{StaticResource PhoneBackgroundBrush}" 
                       Opacity="0.6"
                       Height="800" Width="800"
                       VerticalAlignment="Top"/>
                    <TextBlock Text="{Binding caption}" TextWrapping="Wrap" Width="480" Margin="12,60,12,12" VerticalAlignment="Top" FontSize="{StaticResource PhoneFontSizeNormal}" />

                </Grid>
            </DataTemplate>
        </Grid.Resources>
        <telerikPrimitives:RadSlideView x:Name="slideView" 
                                        ItemsSource="{Binding CurrentPhotos}" 
                                        SelectedItem="{Binding SelectedPhoto, Mode=TwoWay}"
                                        IsShowOverlayContentOnTapEnabled="True" 
                                        ItemTemplate="{StaticResource RadSlideViewItemTemplate}"
                                        OverlayContentTemplate="{StaticResource RadSlideViewOverlayContentTemplate}" />
    </Grid>
<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="save" Click="SavePhoto"/>
            <!--<shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>-->
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>